import 'package:elephant_fish/model/beInvited_entity.dart';
import 'package:elephant_fish/model/user.dart';
import 'package:elephant_fish/model/user_info_entity.dart';
import 'package:elephant_fish/util/size_util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class WelfareCenterList extends StatelessWidget {
  final BeInvitedEntity beInvitedEntity;
  const WelfareCenterList({Key key, this.beInvitedEntity}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Align(alignment: Alignment.topLeft,
          child: Padding(
            padding: EdgeInsets.only(top: SizeUtil.px(37),left: SizeUtil.px(74)),
            child:CircleAvatar(
              radius: SizeUtil.px(35),
              backgroundImage: NetworkImage(beInvitedEntity.beInviteDetails.avatar == '' ? 'https://img0.baidu.com/it/u=1406515706,336510358&fm=26&fmt=auto&gp=0.jpg' :'http://119.28.131.94:82' + beInvitedEntity.beInviteDetails.avatar),
              child: Container(
                width: SizeUtil.px(70),
                height: SizeUtil.px(70),
              ),
            ),
          ),
        ),
        Align(alignment: Alignment.topLeft,
          child: Padding(
            padding: EdgeInsets.only(top: SizeUtil.px(39),left: SizeUtil.px(172)),
            child:Stack(
              children: [
                Text(beInvitedEntity.beInviteDetails.nickname == '' ? '暂未设置昵称' : beInvitedEntity.beInviteDetails.nickname,style: TextStyle(fontSize: SizeUtil.px(28),color: Color(0xfff3f3f3)),),
                Padding(padding: EdgeInsets.only(top: SizeUtil.px(36)),
                  child: Text('ID：' + beInvitedEntity.beInviteDetails.idNumber.toString(),style: TextStyle(fontSize: SizeUtil.px(22),color: Color(0xfff3f3f3)),),
                ),

              ],
            )
          ),
        ),
        Align(alignment: Alignment.centerRight,
          child: Padding(
              padding: EdgeInsets.only(top: SizeUtil.px(56),right: SizeUtil.px(73)),
              child:
                  Text('已充值：' + beInvitedEntity.beInviteDetails.rechargeAmount,style: TextStyle(fontSize: SizeUtil.px(28),color: Color(0xfff3f3f3)),),



          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child: Padding(
            padding: EdgeInsets.only(top: SizeUtil.px(149)),
            child: Divider(
              height: SizeUtil.px(1),
              color: Color(0xfff3f3f3),
            ),
          ),
        ),
      ],
    );
  }
}
